﻿@page "/clipboard-service"
@inject IStringLocalizer<Clipboards> Localizer

<DemoBlock Title="@Localizer["ClipboardTitle"]" Introduction="@Localizer["ClipboardIntro"]" ShowCode="false" Name="Clipboard">
    <Pre>[Inject]
[NotNull]
private ClipboardService? ClipboardService { get; set; }

private async Task Copy()
{
    await ClipboardService.Copy(content);
}

private async Task Get()
{
    var clipboardItems = await ClipboardService.Get();
}

private async Task GetText()
{
    var text = await ClipboardService.GetText();
}</Pre>
    <BootstrapInputGroup>
        <BootstrapInput @bind-Value="@content" />
        <Button Text="Copy" OnClick="@Copy" />
        <Button Color="Color.Warning" Text="Get" OnClick="@Get" />
    </BootstrapInputGroup>
</DemoBlock>

<MethodTable Items="GetMethods()" />
